-
Notifications
You must be signed in to change notification settings - Fork 223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Large-scale load testing article #15
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stumbled upon this PR in my notification center and got curious. Thought I'd leave some comments (yeah I know it's WIP). Feel free to just resolve them if you disagree. Great and interesting article! 👏
src/data/markdown/docs/01 guides/05 Testing Guides/04 Large-scale k6 testing.md
Outdated
Show resolved
Hide resolved
src/data/markdown/docs/01 guides/05 Testing Guides/04 Large-scale k6 testing.md
Show resolved
Hide resolved
src/data/markdown/docs/01 guides/05 Testing Guides/04 Large-scale k6 testing.md
Outdated
Show resolved
Hide resolved
src/data/markdown/docs/01 guides/05 Testing Guides/04 Large-scale k6 testing.md
Outdated
Show resolved
Hide resolved
src/data/markdown/docs/01 guides/05 Testing Guides/04 Large-scale k6 testing.md
Outdated
Show resolved
Hide resolved
src/data/markdown/docs/01 guides/05 Testing Guides/04 Large-scale k6 testing.md
Outdated
Show resolved
Hide resolved
src/data/markdown/docs/01 guides/05 Testing Guides/04 Large-scale k6 testing.md
Outdated
Show resolved
Hide resolved
src/data/markdown/docs/01 guides/05 Testing Guides/04 Large-scale k6 testing.md
Outdated
Show resolved
Hide resolved
src/data/markdown/docs/01 guides/05 Testing Guides/04 Large-scale k6 testing.md
Outdated
Show resolved
Hide resolved
src/data/markdown/docs/01 guides/05 Testing Guides/04 Large-scale k6 testing.md
Outdated
Show resolved
Hide resolved
src/data/markdown/docs/01 guides/05 Testing Guides/04 Large-scale k6 testing.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! The amount of performance achieved by scaling is impressive! 🎉
src/data/markdown/docs/01 guides/05 Testing Guides/04 Large-scale k6 testing.md
Outdated
Show resolved
Hide resolved
src/data/markdown/docs/01 guides/05 Testing Guides/04 Large-scale k6 testing.md
Outdated
Show resolved
Hide resolved
src/data/markdown/docs/01 guides/05 Testing Guides/04 Large-scale k6 testing.md
Outdated
Show resolved
Hide resolved
src/data/markdown/docs/01 guides/05 Testing Guides/04 Large-scale k6 testing.md
Show resolved
Hide resolved
src/data/markdown/docs/01 guides/05 Testing Guides/04 Large-scale k6 testing.md
Outdated
Show resolved
Hide resolved
src/data/markdown/docs/01 guides/05 Testing Guides/04 Large-scale k6 testing.md
Outdated
Show resolved
Hide resolved
src/data/markdown/docs/01 guides/05 Testing Guides/04 Large-scale k6 testing.md
Outdated
Show resolved
Hide resolved
``` | ||
</div> | ||
|
||
k6 will use about 50% of memory in comparison to running the original script. It will also reduce the CPU load. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would argue that if your script is simple and uses discardResponseBodies the difference is more like 85% , with a 1.5mb json data file(If my memory served) the difference was 50%, but I can't currently find where I've said that 😭 . I would argue some links to benchmark data will be useful here.
Also another thing that compatibility-mode=base does is "significantly" increase the startup time. In the above linked script I ran the script for 60s and in the one case there were additiona minute and 5 seconds (on average) additiona time in the other a secodn and a half for 3500 VUs. Which IMO is "significant" :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the text. If you have relevant benchmark links, let me know.
src/data/markdown/docs/01 guides/05 Testing Guides/04 Large-scale k6 testing.md
Outdated
Show resolved
Hide resolved
|
||
Setup: | ||
- All tests were executed on AWS EC2 instances | ||
- The "discardResponseBodies" recommendation was NOT used. (results would be better with this setting). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would argue you can try to do a test with this and see how much better they will be :). This way when someone doesn't use it and looks at optimizing they can see some example of what the difference si
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, that's a fair point, but I don't want to go back to testing for this article :-)
I'll maintain this page, and will likely update it later.
src/data/markdown/docs/01 guides/05 Testing Guides/04 Large-scale k6 testing.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great article 👏 Just a few grammatical and spelling issues to fix.
src/data/markdown/docs/01 guides/05 Testing Guides/04 Large-scale k6 testing.md
Outdated
Show resolved
Hide resolved
src/data/markdown/docs/01 guides/05 Testing Guides/04 Large-scale k6 testing.md
Outdated
Show resolved
Hide resolved
src/data/markdown/docs/01 guides/05 Testing Guides/04 Large-scale k6 testing.md
Outdated
Show resolved
Hide resolved
src/data/markdown/docs/01 guides/05 Testing Guides/04 Large-scale k6 testing.md
Outdated
Show resolved
Hide resolved
src/data/markdown/docs/01 guides/05 Testing Guides/04 Large-scale k6 testing.md
Outdated
Show resolved
Hide resolved
src/data/markdown/docs/01 guides/05 Testing Guides/04 Large-scale k6 testing.md
Outdated
Show resolved
Hide resolved
The AWS EC2 instances are relatively cheap. Even the largest instance we have used in this benchmark (m5.24xlarge) costs only $4.6 per hour. Make sure to turn off the load-gen servers once you are done with your testing. Forgotten EC2 server will cost $3312 per month. | ||
Tip: it's often possible to launch "spot instances" of the same hardware for 10-20% of the cost. | ||
|
||
## Errors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section is really good, but it feels like it shouldn't be in its own article on "Understanding k6 errors" or something like that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@robingustafsson I suspect there's a negation too much in that sentence? 😅 If so, I agree that it would be nice to have in its own article.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 I'll release this as is, and then branch it out to another article :-)
src/data/markdown/docs/01 guides/05 Testing Guides/04 Large-scale k6 testing.md
Outdated
Show resolved
Hide resolved
|
||
We have executed few large tests on different EC2 machines to see how much load k6 can generate. | ||
Our general observation is that k6 scales proportionally to the hardware. 2x larger machine is able to generate 2x more traffic. | ||
The limit to this scalability is in the number of open connections. Single Linux machine can open up to `65 535` sockets per IP. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick but it's per <src IP, src port, dst IP, dst port> tuple afaik, so should be able to go beyond 65k if machine has multiple nics with different IPs or target system hostnam is behind a load balancer with different IPs etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy to update that, but I think I'll have to mention that k6 doesn't have support for multiple IPs and discuss this for a while. I don't want to go too much off-topic :-) (here's another hyphen!)
I also think that the limit of 65k is for <src IP, src port>. I don't think the destination IP matters when all 65k ports are already used by the load-gen server. (or maybe I'm missing something).
src/data/markdown/docs/01 guides/05 Testing Guides/04 Large-scale k6 testing.md
Outdated
Show resolved
Hide resolved
…ale k6 testing.md Co-authored-by: Mihail Stoykov <[email protected]>
src/components/templates/doc-page/code-group/doc-page-code-group.view.js
Show resolved
Hide resolved
1 - I am not sure if the location of the article is the best one. The Test Types section follows a structure and convention that differs from this one. Not sure, move to MISC, 2 - I think this article should be linked from other articles. For example fine-tuning, stress testing... |
@sniku oops. Sorry. 2 - Sure! We use the 3 - I think the title could be improved to be discovered more easily from the sidebar menu. |
Your title fits in the allotted space, so you win :-) |
In addition to the article itself. This PR fixes the annoying codeblock indentation.
Before:
After:
The "labels" prop is no longer required for the codeblock